#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int arr[100000][2];
int main()
{
	arr[1][0] = 1;
	int rem = 0;
	int n;
	scanf("%d", &n);
	int i;
	printf("%d\n", 1);
	for (i = 1; i < n; i++) {
		for (int j = 0, remb = rem == 1 ? 0 : 1; arr[j][rem] != 0||j==0; j++) {
			arr[j + 1][remb] = arr[j][rem] + arr[j + 1][rem];
			printf("%d ", arr[j + 1][remb]);
		}
		printf("\n");
		if (rem)rem = 0;
		else rem = 1;
	}
	return 0;
}